package com.carkeeper.system.controller;

import com.carkeeper.common.utils.Result;
import com.carkeeper.system.pojo.Menu;
import com.carkeeper.system.service.MenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 周志雄
 * @version 1.0
 * @date 2020/11/25 19:27
 */
@RestController
@CrossOrigin
@RequestMapping("/menu")
@Api(tags = "菜单接口api",description = "菜单的查询")
public class MenuController {

    @Autowired
    private MenuService menuService;

    @GetMapping
    @ApiOperation(value = "findAll", notes = "查询所有菜单", httpMethod = "GET")
    public Result<Menu> findAll() {
        Result result = menuService.findAll();
        return result;
    }
}
